#include<bits/stdc++.h>
using namespace std;
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    int n,ans,a[100005],b[100005]={0},c[100005]={0},maxn=INT_MIN;
    cin>>n;
    ans=n;
    for(int i=0;i<n;i++){
        cin>>a[i];
        b[a[i]]++;
        c[a[i]]++;
        maxn=max(maxn,a[i]);
    }
    for(int i=1;i<=maxn;i++){
        int j=i+1;
        while(b[i]&&j<=maxn){
            if(b[i]>c[j]){
                b[i]-=c[j];
                ans-=c[j];
                c[j]=0;
            }else{
                ans-=b[i];
                c[j]-=b[i];
                b[i]=0;
            }
            j++;
        }
    }
    cout<<ans<<endl;
    return 0;
}
